home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / shells / zsh-3.000 / zsh-3 / home / ftp / pub / local / info / zsh.info-3 (.txt) < prev    next >
GNU Info File  |  1996-07-16  |  45KB  |  961 lines

  1. This is Info file zsh.info, produced by Makeinfo-1.63 from the input
  2. file ./zsh.texi.
  3. This is a texinfo version of the man page for the Z Shell, originally by
  4. Paul Falstad.  It was converted from the `zsh.1' file distributed with
  5. zsh v2.5.0 by Jonathan Hardwick, `jch@cs.cmu.edu' and updated/modified
  6. by Clive Messer, `clive@epos.demon.co.uk' to it's present state.
  7. File: zsh.info,  Node: Array Parameters,  Next: Positional Parameters,  Up: Parameters
  8. Array Parameters
  9. ================
  10. The value of an array parameter may be assigned by writing:
  11.    NAME=(VALUE ...) ...
  12. Individual elements of an array may be selected using a subscript.  A
  13. subscript of the form `[EXP]' selects the single element EXP, where EXP
  14. is an arithmetic expression which will be subject to arithmetic
  15. expansion as if it were surrounded by `$((...))'.  The elements are
  16. numbered beginning with 1 unless the `KSH_ARRAYS' option is set when
  17. they are numbered from zero.  A subscript of the form `[*]' or `[@]'
  18. evaluates to all elements of an array; there is no difference between
  19. the two except when they appear within double quotes.  `"$foo[*]"'
  20. evaluates to `"$foo[1] $foo[2] ..."', while `"$foo[@]"' evaluates to
  21. `"$foo[1]"' `"$foo[2]"', etc.  A subscript of the form `[EXP1,EXP2]'
  22. selects all elements in the range EXP1 to EXP2, inclusive.  If one of
  23. the subscripts evaluates to a negative number, say `-N', then the N'th
  24. element from the end of the array is used.  Thus `$foo[-3]' is the
  25. third element from the end of the array `foo', and `$foo[1,-1]' is the
  26. same as `$foo[*]'.
  27. Subscripting may also be performed on non-array values, in which case
  28. the subscripts specify a substring to be extracted.  For example, if
  29. `FOO' is set to `foobar', then `echo $FOO[2,5]' prints `ooba'.
  30. If a subscript is used on the left side of an assignment the selected
  31. range is replaced by the expression on the right side.
  32. If the opening bracket or the comma is directly followed by an opening
  33. parenthesis the string up to the matching closing parenthesis is
  34. considered to be a list of flags.  The flags currently understood are:
  35.      This option has no effect and retained for backward compatibility
  36.      only.
  37.      If the parameter subscripted is a scalar, then this flag makes
  38.      subscription work on a per-word basis instead of characters.
  39. `s:STRING:'
  40.      Defines the STRING that separates words (for use with the `w'
  41.      flag).
  42.      Recognize the same escape sequences as the `print' builtin in the
  43.      string argument of a subsequent `s' flag.
  44.      If the parameter subscripted is a scalar than this flag makes
  45.      subscription work on a per-line basis instead of characters.
  46.      This is a shorthand for `pws:\n:'.
  47.      If this flag is given the exp is taken as a pattern and the result
  48.      is the first matching array element, substring or word (if the
  49.      parameter is an array, if it is a scalar, or if it is a scalar and
  50.      the `w' flag is given, respectively); note that this is like
  51.      giving a number: `$foo[(r)??,3]' and `$foo[(r)??,(r)f*]' work.
  52.      Like `r', but gives the last match.
  53.      Like `r', but gives the index of the match instead; this may not be
  54.      combined with a second argument.
  55.      Like `i', but gives the index of the last match.
  56. `n:EXPR:'
  57.      If combined with `r', `R', `i', or `I', makes them return the N'th
  58.      or N'th last match (if EXPR evaluates to N).
  59. File: zsh.info,  Node: Positional Parameters,  Next: Parameters Set By The Shell,  Prev: Array Parameters,  Up: Parameters
  60. Positional Parameters
  61. =====================
  62. Positional parameters are set by the shell on invocation, by the `set'
  63. builtin, or by direct assignment.  The parameter N, where N is a
  64. number, is the N'th positional parameter.  The parameters `*', `@', and
  65. `argv' are arrays containing all the positional parameters; thus
  66. `argv[N]', is equivalent to simply N.
  67. File: zsh.info,  Node: Parameters Set By The Shell,  Next: Parameters Used By The Shell,  Prev: Positional Parameters,  Up: Parameters
  68. Parameters Set By The Shell
  69. ===========================
  70. The following parameters are automatically set by the shell:
  71.      The process id of the last background command invoked.
  72.      The number of positional parameters in decimal.
  73. `ARGC'
  74.      Same as `#'.  It has no special meaning in sh/ksh compatibility
  75.      mode.
  76.      The process id of this shell.
  77.      Flags supplied to the shell on invocation or by the `set' or
  78.      `setopt' commands.
  79.      An array containing the positional parameters.
  80. `argv'
  81.      Same as `*'.  It has no special meaning in sh/ksh compatibility
  82.      mode.
  83.      Same as `argv[@]' but it can be used in sh/ksh compatibility mode.
  84.      The exit value returned by the last command.
  85. `status'
  86.      Same as `?'.  It has no special meaning in sh/ksh compatibility
  87.      mode.
  88.      The last argument of the previous command.  Also, this parameter
  89.      is set in the environment of every command executed to the full
  90.      pathname of the command.
  91. `EGID'
  92.      The effective group id of the shell process.  If you have
  93.      sufficient privileges, you may change the effective group id of
  94.      the shell process by assigning to this parameter.  Also (assuming
  95.      sufficient privileges), you may start a single command with a
  96.      different effective group id by: `EGID=egid command'
  97. `EUID'
  98.      The effective user id of the shell process.  If you have sufficient
  99.      privileges, you may change the effective user id of the shell
  100.      process by assigning to this parameter.  Also (assuming sufficient
  101.      privileges), you may start a single command with a different
  102.      effective user id by: `EUID=euid command'
  103. `ERRNO'
  104.      The value of `errno' as set by the most recently failed system
  105.      call.  This value is system dependent and is intended for debugging
  106.      purposes.
  107. `GID'
  108.      The group id of the shell process.  If you have sufficient
  109.      privileges, you may change the group id of the shell process by
  110.      assigning to this parameter.  Also (assuming sufficient
  111.      privileges), you may start a single command under a different
  112.      group id by: `GID=gid command'
  113. `HOST'
  114.      The current hostname.
  115. `LINENO'
  116.      The line number of the current line within the current script being
  117.      executed.
  118. `LOGNAME'
  119.      If the corresponding variable is not set in the environment of the
  120.      shell, it is initialized to the login name corresponding to the
  121.      current login session.  This parameter is exported by default but
  122.      this can be disabled using the `typeset' builtin.
  123. `MACHTYPE'
  124.      The machine type (microprocessor class or machine model), as
  125.      determined at compile time.
  126. `OLDPWD'
  127.      The previous working directory.
  128. `OPTARG'
  129.      The value of the last option argument processed by the `getopts'
  130.      command.
  131. `OPTIND'
  132.      The index of the last option argument processed by the `getopts'
  133.      command.
  134. `OSTYPE'
  135.      The operating system, as determined at compile time.
  136. `PPID'
  137.      The process id of the parent of the shell.
  138. `PWD'
  139.      The present working directory.
  140. `RANDOM'
  141.      A random integer from 0 to 32767, newly generated each time this
  142.      parameter is referenced.  The random number generator can be
  143.      seeded by assigning a numeric value to `RANDOM'.
  144. `SECONDS'
  145.      The number of seconds since shell invocation.  If this parameter is
  146.      assigned a value, then the value returned upon reference will be
  147.      the value that was assigned plus the number of seconds since the
  148.      assignment.
  149. `SHLVL'
  150.      Incremented by one each time a new shell is started.
  151. `signals'
  152.      An array containing the names of the signals.
  153. `TTY'
  154.      The name of the tty associated with the shell, if any.
  155. `TTYIDLE'
  156.      The idle time of the tty associated with the shell in seconds or
  157.      -1 if there is no such tty.
  158. `UID'
  159.      The user id of the shell process.  If you have sufficient
  160.      privileges, you may change the user id of the shell by assigning
  161.      to this parameter.  Also (assuming sufficient privileges), you may
  162.      start a single command under a different user id by: `UID=uid
  163.      command'
  164. `USERNAME'
  165.      The username corresponding to the user id of the shell process.
  166.      If you have sufficient privileges, you may change the username
  167.      (and also the user id and group id) of the shell by assigning to
  168.      this parameter.  Also (assuming sufficient privileges), you may
  169.      start a single command under a different username (and user id and
  170.      group id) by: `USERNAME=username command'
  171. `VENDOR'
  172.      The vendor, as determined at compile time.
  173. `ZSHNAME'
  174. `ZSH_NAME'
  175.      Expands to the basename of the command used to invoke this
  176.      instance of zsh.
  177. `ZSH_VERSION'
  178.      The version number of this zsh.
  179. File: zsh.info,  Node: Parameters Used By The Shell,  Prev: Parameters Set By The Shell,  Up: Parameters
  180. Parameters Used By The Shell
  181. ============================
  182. The following parameters are used by the shell:
  183. `ARGV0'
  184.      If exported, its value is used as argv[0] of external commands.
  185.      Usually used in constructs like `ARGV0=emacs nethack'.
  186. `BAUD'
  187.      The baud rate of the current connection.  Used by the line editor
  188.      update mechanism to compensate for a slow terminal by delaying
  189.      updates until necessary.  This may be profitably set to a lower
  190.      value in some circumstances, e.g. for slow modems dialing into a
  191.      communications server which is connected to a host via a fast
  192.      link; in this case, this variable would be set by default to the
  193.      speed of the fast link, and not the modem.  This parameter should
  194.      be set to the baud rate of the slowest part of the link for best
  195.      performance.  The compensation mechanism can be turned off by
  196.      setting the variable to zero.
  197. `cdpath (CDPATH)'
  198.      An array (colon-separated list) of directories specifying the
  199.      search path for the `cd' command.
  200. `COLUMNS'
  201.      The number of columns for this terminal session.  Used for printing
  202.      select lists and for the line editor.
  203. `DIRSTACKSIZE'
  204.      The maximum size of the directory stack.  If the stack gets larger
  205.      than this, it will be truncated automatically.  This is useful
  206.      with the `AUTO_PUSHD' option.
  207. `FCEDIT'
  208.      The default editor for the `fc' builtin.
  209. `fignore (FIGNORE)'
  210.      An array (colon-separated list) containing the suffixes of files
  211.      to be ignored during filename completion.  But if the completion
  212.      generates only files which would match if this variable would be
  213.      ignored, than these files are completed anyway.
  214. `fpath (FPATH)'
  215.      An array (colon-separated list) of directories specifying the
  216.      search path for function definitions.  This path is searched when
  217.      a function with the `-u' attribute is referenced.  If an
  218.      executable file is found, then it is read and executed in the
  219.      current environment.
  220. `histchars'
  221.      Three characters used by the shell's history and lexical analysis
  222.      mechanism.  The first character signals the start of a history
  223.      substitution (default `!').  The second character signals the start
  224.      of a quick history substitution (default `^').  The third character
  225.      is the comment character (default `#').
  226. `HISTCHARS'
  227.      Depreciated. Use `histchars'.
  228. `HISTFILE'
  229.      The file to save the history in when an interactive shell exits.
  230.      If unset, the history is not saved.
  231. `HISTSIZE'
  232.      The maximum size of the history list.
  233. `HOME'
  234.      The default argument for the `cd' command.
  235. `IFS'
  236.      Internal field separators, normally space, tab, and newline, that
  237.      are used to separate words which result from command or parameter
  238.      substitution and words read by the `read' builtin.  Any characters
  239.      from the set space, tab and newline that appear in the `IFS' are
  240.      called "IFS white space".  One or more IFS white space characters
  241.      or one non-IFS white space character together with any adjacent
  242.      IFS white space character delimit a field.  If an IFS white space
  243.      character appears twice consecutively in the `IFS', this character
  244.      is treated as if it were not an IFS white space character.
  245. `KEYTIMEOUT'
  246.      The time the shell waits, in hundredths of seconds, for another
  247.      key to be pressed when reading bound multi-character sequences.
  248. `LINES'
  249.      The number of lines for this terminal session.  Used for printing
  250.      select lists and for the line editor.
  251. `LISTMAX'
  252.      In the line editor, the number of filenames to list without asking
  253.      first.  If set to zero, the shell asks only if the listing would
  254.      scroll off the screen.
  255. `LOGCHECK'
  256.      The interval in seconds between checks for login/logout activity
  257.      using the `watch' parameter.
  258. `MAIL'
  259.      If this parameter is set and `mailpath' is not set, the shell looks
  260.      for mail in the specified file.
  261. `MAILCHECK'
  262.      The interval in seconds between checks for new mail.
  263. `mailpath (MAILPATH)'
  264.      An array (colon-separated list) of filenames to check for new
  265.      mail.  Each filename can be followed by a `?' and a message that
  266.      will be printed.  The message will undergo parameter expansion,
  267.      command substitution and arithmetic substitution with the variable
  268.      `$_' defined as the name of the file that has changed.  The
  269.      default message is `You have new mail'.  If an element is a
  270.      directory instead of a file the shell will recursively check every
  271.      file in every subdirectory of the element.
  272. `manpath (MANPATH)'
  273.      An array (colon-separated list) whose value is not used by the
  274.      shell.  The `manpath' array can be useful, however, since setting
  275.      it also sets `MANPATH', and vice versa.
  276. `NULLCMD'
  277.      The command name to assume if a redirection is specified with no
  278.      command.  Defaults to `cat'.  For sh/ksh-like behaviour, change
  279.      this to `:'.  For csh-like behaviour, unset this parameter; the
  280.      shell will print an error message if null commands are entered.
  281. `path (PATH)'
  282.      An array (colon-separated list) of directories to search for
  283.      commands.  When this parameter is set, each directory is scanned
  284.      and all files found are put in a hash table.
  285. `POSTEDIT'
  286.      This string is output whenever the line editor exits.  It usually
  287.      contains termcap strings to reset the terminal.
  288. `PS1'
  289.      The primary prompt string, printed before a command is read; the
  290.      default is `%m%# '.  If the escape sequence takes an optional
  291.      integer, it should appear between the `%' and the next character
  292.      of the sequence.  The following escape sequences are recognized:
  293.     `%%'
  294.           A `%'.
  295.     `%)'
  296.           A `)'.
  297.     `%d'
  298.     `%/'
  299.           Present working directory (`$PWD').
  300.     `%~'
  301.           `$PWD'.  If it has a named directory as its prefix, that part
  302.           is replaced by a `~' followed by the name of the directory.
  303.           If it starts with `$HOME', that part is replaced by a `~'.
  304.     `%c'
  305.     `%.'
  306.     `%C'
  307.           Trailing component of `$PWD'.  An integer may follow the `%'
  308.           to get more than one component.  Unless `%C' is used, tilde
  309.           expansion is performed first.
  310.     `!'
  311.     `%h'
  312.     `%!'
  313.           Current history event number.
  314.     `%M'
  315.           The full machine hostname.
  316.     `%m'
  317.           The hostname up to the first `.'.  An integer may follow the
  318.           `%' to specify how many components of the hostname are
  319.           desired.
  320.     `%S (%s)'
  321.           Start (stop) standout mode.
  322.     `%U (%u)'
  323.           Start (stop) underline mode.
  324.     `%B (%b)'
  325.           Start (stop) boldface mode.
  326.     `%t'
  327.     `%@'
  328.           Current time of day, in 12-hour, am/pm format.
  329.     `%T'
  330.           Current time of day, in 24-hour format.
  331.     `%*'
  332.           Current time of day in 24-hour format, with seconds.
  333.     `%n'
  334.           `$USERNAME'.
  335.     `%w'
  336.           The date in day-dd format.
  337.     `%W'
  338.           The date in mm/dd/yy format.
  339.     `%D'
  340.           The date in yy-mm-dd format.
  341.     `%D{STRING}'
  342.           STRING is formatted using the `strftime' function.  See
  343.           `strftime(3)' for more details, if your system has it.
  344.     `%l'
  345.           The line (tty) the user is logged in on.
  346.     `%?'
  347.           The return code of the last command executed just before the
  348.           prompt.
  349.     `%_'
  350.           The status of the parser, i.e. the shell constructs (like
  351.           `if' and `for') that have been started on the command line.
  352.           If given an integer number, that many strings will be printed.
  353.     `%E'
  354.           Clears to end of line.
  355.     `%#'
  356.           A `#' if the shell is running as root, a `%' if not.
  357.           Equivalent to `%(#.#.%%)'
  358.     `%v'
  359.           The value of the first element of the `psvar' array parameter.
  360.           Following the `%' with an integer gives that element of the
  361.           array.
  362.     `%{...%}'
  363.           Include a string as a literal escape sequence.  The string
  364.           within the braces should not change the cursor position.
  365.     `%(x.TRUE-TEXT.FALSE-TEXT)'
  366.           Specifies a ternary expression.  The character following the
  367.           `x' is arbitrary; the same character is used to separate the
  368.           text for the true result from that for the false result.  The
  369.           separator may not appear in the `true-text', except as part
  370.           of a `%' sequence.  A `)' may appear in the `false-text' as a
  371.           `%)'.  `true-text' and `false-text' may both contain contain
  372.           arbitrarily-nested escape sequences, including further
  373.           ternary expressions.  The left parenthesis may be preceded or
  374.           followed by a positive integer `n', which defaults to zero.
  375.           The test character `x' may be any of the following:
  376.          `c'
  377.          `.'
  378.          `~'
  379.                True if the current path, with prefix replacement, has
  380.                at least N elements.
  381.          `/'
  382.          `C'
  383.                True if the current absolute path has at least N
  384.                elements.
  385.          `t'
  386.                True if the time in minutes is equal to N.
  387.          `T'
  388.                True if the time in hours is equal to N.
  389.          `d'
  390.                True if the day of the month is equal to N.
  391.          `D'
  392.                True if the month is equal to N (January = 0).
  393.          `w'
  394.                True if the day of the week is equal to N (Sunday = 0).
  395.          `?'
  396.                True if the exit status of the last command was N.
  397.          `#'
  398.                True if the effective uid of the current process is N.
  399.          `g'
  400.                True if the effective gid of the current process is N.
  401.          `L'
  402.                True if the `SHLVL' parameter is at least N.
  403.          `S'
  404.                True if the `SECONDS' parameter is at least N.
  405.          `v'
  406.                True if the array `psvar' has at least N elements.
  407.          `_'
  408.                True if at least N shell constructs were started.
  409.          `%<STRING<'
  410.          `%>STRING>'
  411.          `%[XSTRING]'
  412.                Specifies truncation behaviour.  The third form is
  413.                equivalent to `%XSTRINGX', i.e. `X' may be `<' or `>'.
  414.                The numeric argument, which in the third form may appear
  415.                immediately after the `[', specifies the maximum
  416.                permitted length of the various strings that can be
  417.                displayed in the prompt.  If this integer is zero, or
  418.                missing, truncation is disabled.  Truncation is initially
  419.                disabled.  The forms with `<' truncate at the left of
  420.                the string, and the forms with `>' truncate at the right
  421.                of the string.  For example, if the current directory is
  422.                `/home/pike', the prompt `%8<..<%/' will expand to
  423.                `..e/pike'.  The `string' will be displayed in place of
  424.                the truncated portion of any string.  In this string,
  425.                the terminating character (`<', `>' or `]'), or in fact
  426.                any character, may be quoted by a preceding `\'.  `%'
  427.                sequences are not treated specially.  If the `string' is
  428.                longer than the specified truncation length, it will
  429.                appear in full, completely replacing the truncated
  430.                string.
  431. `PS2'
  432.      The secondary prompt, printed when the shell needs more
  433.      information to complete a command.  Recognizes the same escape
  434.      sequences as `$PS1'.  The default is `> '.
  435. `PS3'
  436.      Selection prompt used within a `select' loop.  Recognizes the same
  437.      escape sequences as `PS1'.  The default is `?# '.
  438. `PS4'
  439.      The execution trace prompt.  Default is `+ '.
  440. `PROMPT'
  441. `PROMPT2'
  442. `PROMPT3'
  443. `PROMPT4'
  444.      Same as `PS1', `PS2', `PS3', and `PS4', respectively.  These
  445.      parameters do not have any special meaning in sh/ksh compatibility
  446.      mode.
  447. `psvar (PSVAR)'
  448.      An array (colon-separated list) whose first nine values can be
  449.      used in `PROMPT' strings.  Setting `psvar' also sets `PSVAR', and
  450.      vice versa.
  451. `prompt'
  452.      Same as `PS1'.  It has no special meaning in sh/ksh compatibility
  453.      mode.
  454. `READNULLCMD'
  455.      The command name to assume if a single input redirection is
  456.      specified with no command.  Defaults to `more'.
  457. `REPORTTIME'
  458.      If nonzero, commands whose combined user and system execution times
  459.      (measured in seconds) are greater than this value have timing
  460.      statistics printed for them.
  461. `RPROMPT'
  462. `RPS1'
  463.      This prompt is displayed on the right-hand side of the screen when
  464.      the primary prompt is being displayed on the left.  This does not
  465.      work if the `SINGLELINEZLE' option is set.  Recognizes the same
  466.      escape sequences as `PROMPT'.
  467. `SAVEHIST'
  468.      The maximum number of history events to save in the history file.
  469. `SPROMPT'
  470.      The prompt used for spelling correction.  The sequence `%R' expands
  471.      to the string which presumably needs spelling correction, and `%r'
  472.      expands to the proposed correction.  All other `PROMPT' escapes are
  473.      also allowed.
  474. `STTY'
  475.      If this parameter is set in a command's environment, the shell
  476.      runs the `stty' command with the value of this parameter as
  477.      arguments in order to set up the terminal before executing the
  478.      command.  The modes apply only to the command, and are reset when
  479.      it finishes or is suspended.  If the command is suspended and
  480.      continued later with the `fg' or `wait' builtins it will see the
  481.      modes specified by `STTY', as if it were not suspended.  This
  482.      (intentionally) does not apply if the command is continued via
  483.      `kill -CONT'.  `STTY' is ignored if the command is run in the
  484.      background, or if it is in the environment of the shell but not
  485.      explicitly assigned to in the input line.  This avoids running
  486.      `stty' at every external command by accidentally exporting it.
  487.      Also note that `STTY' should not be used for window size
  488.      specifications; these will not be local to the command.
  489. `TIMEFMT'
  490.      The format of process time reports with the `time' keyword.  The
  491.      default is `%E real  %U user  %S system  %P %J'.  Recognizes the
  492.      following escape sequences:
  493.     `%'
  494.           A `%'.
  495.     `%U'
  496.           CPU seconds spent in user mode.
  497.     `%S'
  498.           CPU seconds spent in kernel mode.
  499.     `%E'
  500.           Elapsed time in seconds.
  501.     `%P'
  502.           The CPU percentage, computed as (%U+%S)/%E.
  503.     `%J'
  504.           The name of this job.
  505.      A star may be inserted between the percent sign and flags printing
  506.      time.  This cause the time to be printed in `hh:mm:ss.ttt' format
  507.      (hours and minutes are only printed if they are not zero).
  508. `TMOUT'
  509.      If this parameter is nonzero, the shell will receive an `ALRM'
  510.      signal if a command is not entered within the specified number of
  511.      seconds after issuing a prompt.  If there is a trap on `SIGALRM',
  512.      it will be executed and a new alarm is scheduled using the value
  513.      of the `TMOUT' parameter after executing the trap.  If no trap is
  514.      set, and the idle time of the terminal is not less than the value
  515.      of the `TMOUT' parameter, zsh terminates.  Otherwise a new alarm
  516.      is scheduled to `TMOUT' seconds after the last keypress.
  517. `TMPPREFIX'
  518.      A pathname prefix which the shell will use for all temporary files.
  519.      Note that this should include an initial part for the file name as
  520.      well as any directory names.  The default is `/tmp/zsh'.
  521. `watch (WATCH)'
  522.      An array (colon-separated list) of login/logout events to report.
  523.      If it contains the single word `all', then all login/logout events
  524.      are reported.  If it contains the single word `notme', then all
  525.      login/logout events are reported except for those originating from
  526.      `$USERNAME'.  An entry in this list may consist of a username, an
  527.      `@' followed by a remote hostname, and a `%' followed by a line
  528.      (tty).  Any or all of these components may be present in an entry;
  529.      if a login/logout event matches all of them, it is reported.
  530. `WATCHFMT'
  531.      The format of login/logout reports if the `watch' parameter is set.
  532.      Default is `%n has %a %l from %m'.  Recognizes the following escape
  533.      sequences:
  534.     `%n'
  535.           The name of the user that logged in/out.
  536.     `%a'
  537.           The observed action, i.e. `logged on' or `logged off'.
  538.     `%l'
  539.           The line (tty) the user is logged in on.
  540.     `%M'
  541.           The full hostname of the remote host.
  542.     `%m'
  543.           The hostname up to the first `.'.  If only the IP address is
  544.           available or the utmp field contains the name of an X-windows
  545.           display, the whole name is printed.
  546.           NOTE: The `%m' and `%M' escapes will work only if there is a
  547.           host name field in the `utmp' on your machine.  Otherwise
  548.           they are treated as ordinary strings.
  549.     `%S (%s)'
  550.           Start (stop) standout mode.
  551.     `%U (%u)'
  552.           Start (stop) underline mode.
  553.     `%B (%b)'
  554.           Start (stop) boldface mode.
  555.     `%t'
  556.     `%@'
  557.           The time, in 12-hour, am/pm format.
  558.     `%T'
  559.           The time, in 24-hour format.
  560.     `%w'
  561.           The date in day-dd format.
  562.     `%W'
  563.           The date in mm/dd/yy format.
  564.     `%D'
  565.           The date in yy-mm-dd format.
  566.     `%(x:TRUE-TEXT:FALSE-TEXT)'
  567.           Specifies a ternary expression.  The character following the
  568.           `x' is arbitrary; the same character is used to separate the
  569.           text for the true result from that for the false result.
  570.           Both the separator and the right parenthesis may be escaped
  571.           with a backslash.  Ternary expressions may be nested.
  572.           The test character `x' may be any one of `l', `n', `m', or
  573.           `M', which indicate a true result if the corresponding escape
  574.           sequence would return a non-empty value; or it may be `a',
  575.           which indicates a true result if the watched user has logged
  576.           in, or false if he has logged out.  Other characters evaluate
  577.           to neither true nor false; the entire expression is omitted
  578.           in this case.
  579.           If the result is true, then the TRUE-TEXT is formatted
  580.           according to the result above and printed, and the FALSE-TEXT
  581.           is skipped.  If false, the TRUE-TEXT is skipped, and the
  582.           FALSE-TEXT is formatted and printed.  Either or both of the
  583.           branches may be empty, but both separators must always be
  584.           present.
  585. `WORDCHARS'
  586.      A list of non-alphanumeric characters considered part of a word by
  587.      the line editor.
  588. `ZDOTDIR'
  589.      The directory to search for shell startup files (`.zshrc', etc), if
  590.      not `$HOME'.
  591. File: zsh.info,  Node: Options,  Next: Shell Builtin Commands,  Prev: Parameters,  Up: Top
  592. Options
  593. *******
  594. The following options may be set upon invocation of the shell, or with
  595. the `set', `setopt', and `unsetopt' builtins.  They are
  596. case-insensitive and underscores are ignored, that is, `allexport' is
  597. equivalent to `A__lleXP_ort'.
  598. The single letter names given in parentheses can be used when invoking
  599. the shell, or with the builtin commands `set', `setopt' and `unsetopt'.
  600. If the shell is invoked as `sh' or `ksh', the single letter names
  601. marked by `ksh:' are used instead.
  602. `ALL_EXPORT (-a, ksh: -a)'
  603.      All parameters subsequently defined are automatically exported.
  604. `ALWAYS_LAST_PROMPT'
  605.      If unset, key functions that list completions try to return to the
  606.      last prompt if given a numeric argument.  If set, these functions
  607.      try to return to the last prompt if given no numeric argument.
  608. `ALWAYS_TO_END'
  609.      If a completion with the cursor in the word was started and it
  610.      results in only one match, the cursor is placed at the end of the
  611.      word.
  612. `APPEND_HISTORY'
  613.      If this is set, zsh sessions will append their history list to the
  614.      history file, rather than overwrite it.  Thus, multiple parallel
  615.      zsh sessions will all have their history lists added to the
  616.      history file, in the order they are killed.  *Note Shell Builtin
  617.      Commands::, for the `fc' command.
  618. `AUTO_CD (-J)'
  619.      If a command is not in the hash table, and there exists an
  620.      executable directory by that name, perform the `cd' command to
  621.      that directory.
  622. `AUTO_LIST (-9)'
  623.      Automatically list choices on an ambiguous completion.
  624. `AUTO_MENU'
  625.      Automatically use menu completion after the second consecutive
  626.      request for completion, for example by pressing the TAB key
  627.      repeatedly.  This option is overridden by `MENU_COMPLETE'.
  628. `AUTO_NAME_DIRS'
  629.      Any parameter that is set to the absolute name of a directory
  630.      immediately becomes a name for that directory in the usual form
  631.      `~param'.  If this option is not set, the parameter must be used in
  632.      that form for it to become a name (a command-line completion is
  633.      sufficient for this).
  634. `AUTO_PARAM_KEYS'
  635.      If a parameter name was completed and the next character typed is
  636.      one of those that have to come directly after the name (like `}',
  637.      `:', etc.), they are placed there automatically.
  638. `AUTO_PARAM_SLASH'
  639.      If a parameter is completed whose content is the name of a
  640.      directory, then add a trailing slash.
  641. `AUTO_PUSHD (-N)'
  642.      Make `cd' push the old directory onto the directory stack.
  643. `AUTO_REMOVE_SLASH'
  644.      When the last character resulting from a completion is a slash and
  645.      the next character typed is a word delimiter, remove the slash.
  646. `AUTO_RESUME (-W)'
  647.      Treat single word simple commands without redirection as
  648.      candidates for resumption of an existing job.
  649. `BGNICE (-6)'
  650.      Run all background jobs at a lower priority.  This option is set by
  651.      default.
  652. `BRACE_CCL'
  653.      Expand expressions in braces which would not otherwise undergo
  654.      brace expansion to a lexically ordered list of all the characters.
  655.      *Note Brace Expansion::.
  656. `BSD_ECHO'
  657.      Make the echo builtin compatible with the BSD `echo(1)' command.
  658.      This disables backslashed escape sequences in echo strings unless
  659.      the `-e' option is specified.
  660. `CDABLE_VARS (-T)'
  661.      If the argument to a `cd' command (or an implied `cd' with the
  662.      `AUTO_CD' option set) is not a directory, and does not begin with a
  663.      slash, try to expand the expression as if it were preceded by a
  664.      `~' (*note Filename Expansion::.).
  665. `CHASE_LINKS (-w)'
  666.      Resolve symbolic links to their true values.
  667. `COMPLETE_ALIASES'
  668.      If set, aliases on the command line are not internally substituted
  669.      before completion is attempted.
  670. `COMPLETE_IN_WORD'
  671.      If unset, the cursor is moved to the end of the word if completion
  672.      is started.  Otherwise it stays where it is and completion is done
  673.      from both ends.
  674. `CORRECT (-0)'
  675.      Try to correct the spelling of commands.
  676. `CORRECT_ALL (-O)'
  677.      Try to correct the spelling of all arguments in a line.
  678. `CSH_JUNKIE_HISTORY'
  679.      A history reference without an event specifier will always refer
  680.      to the previous command.
  681. `CSH_JUNKIE_LOOPS'
  682.      Allow loop bodies to take the form `LIST; end' instead of `do
  683.      LIST; done'.
  684. `CSH_JUNKIE_QUOTES'
  685.      Complain if a quoted expression runs off the end of a line; prevent
  686.      quoted expressions from containing un-escaped newlines.
  687. `CSH_NULL_GLOB'
  688.      If a pattern for filename generation has no matches, delete the
  689.      pattern from the argument list; do not report an error unless all
  690.      the patterns in a command have no matches.  Overrides `NULL_GLOB'.
  691. `ERR_EXIT (-e, ksh: -e)'
  692.      If a command has a non-zero exit status, execute the `ZERR' trap,
  693.      if set, and exit.  This is disabled while running initialization
  694.      scripts.
  695. `EXTENDED_GLOB'
  696.      Treat the `#', `~' and `^' characters as part of patterns for
  697.      filename generation, etc.  (An initial unquoted `~' always
  698.      produces named directory expansion (*note Filename Expansion::.).)
  699. `EXTENDED_HISTORY'
  700.      Save beginning and ending timestamps to the history file.  The
  701.      format of these timestamps is `:<BEGINNING TIME>:<ENDING
  702.      TIME>:<COMMAND>'.
  703. `GLOB_ASSIGN'
  704.      If  this  option is set, filename generation is performed on the
  705.      right hand side of parameter assignments.  If the result has more
  706.      than one word the parameter will become an array.  This was the
  707.      default behaviour in earlier versions of zsh but it is
  708.      incompatible with sh and ksh.  Also it is not possible to tell in
  709.      advance whether the result will be a scalar or an array.  This
  710.      option is provided for backwards compatibility only.  Globbing is
  711.      always performed on the right hand side of `NAME=( VALUE )' array
  712.      assignments regardless of this option.
  713. `GLOB_COMPLETE'
  714.      When the current word has a glob pattern, do not insert all the
  715.      words resulting from the expansion but cycle through them like
  716.      `MENU_COMPLETE'.  If no matches are found, a `*' is added to the
  717.      end of the word, or inserted at the cursor if `COMPLETE_IN_WORD'
  718.      is set, and completion is attempted again.  Using patterns works
  719.      not only for files but for all completions, such as options, user
  720.      names, etc.
  721. `GLOB_DOTS (-4)'
  722.      Do not require a leading `.' in a filename to be matched
  723.      explicitly.
  724. `GLOB_SUBST'
  725.      Treat any characters resulting from parameter substitution as being
  726.      eligible for file expansion and filename generation, and any
  727.      characters resulting from command substitution as being eligible
  728.      for filename generation.
  729. `HASH_CMDS'
  730.      Place the location of each command in the hash table the first
  731.      time it is executed.  If this option is unset, no path hashing
  732.      will be done at all.
  733. `HASH_DIRS'
  734.      Whenever a command is executed, hash the directory containing it,
  735.      as well as all directories that occur earlier in the path.  Has no
  736.      effect if `HASH_CMDS' is unset.
  737. `HASH_LIST_ALL'
  738.      Whenever a command completion is attempted, make sure the entire
  739.      command path is hashed first.  This makes the first completion
  740.      slower.
  741. `HIST_ALLOW_CLOBBER'
  742.      Add `|' to output redirections in the history.  This allows history
  743.      references to clobber files even when `NO_CLOBBER' is set.
  744. `HIST_IGNORE_DUPS (-h)'
  745.      Do not enter command lines into the history list if they are
  746.      duplicates of the previous event.
  747. `HIST_IGNORE_SPACE (-g)'
  748.      Do not enter command lines into the history list if they begin
  749.      with a blank.
  750. `HIST_NO_STORE'
  751.      Remove the `history' (`fc -l') command from the history when
  752.      invoked.
  753. `HIST_VERIFY'
  754.      Whenever the user enters a line with history substitution, don't
  755.      execute the line directly; instead, perform history substitution
  756.      and reload the line into the editing buffer.
  757. `IGNORE_BRACES (-I)'
  758.      Do not perform brace expansion.
  759. `IGNORE_EOF (-7)'
  760.      Do not exit on end-of-file.  Require the use of `exit' or `logout'
  761.      instead.
  762. `INTERACTIVE (-i, ksh: -i)'
  763.      This is an interactive shell.  This option is set upon
  764.      initialisation if the standard input is a tty and commands are
  765.      being read from standard input.  (See the discussion of
  766.      `SHIN_STDIN'.)  This heuristic may be overridden by specifying a
  767.      state for this option on the command line.  The value of this
  768.      option cannot be changed anywhere other than the command line.
  769. `INTERACTIVE_COMMENTS (-k)'
  770.      Allow comments even in interactive shells.
  771. `KSH_ARRAYS'
  772.      Emulate ksh array handling as closely as possible.  If this option
  773.      is set, array elements are numbered from zero and an array
  774.      parameter without subscript refers to the first element instead of
  775.      the whole array.
  776. `KSH_OPTION_PRINT'
  777.      Alters the way options settings are printed.
  778. `LIST_AMBIGUOUS'
  779.      If this option is set completions are shown only if the completions
  780.      don't have an unambiguous prefix or suffix that could be inserted
  781.      in the command line.
  782. `LIST_TYPES (-X)'
  783.      When listing files that are possible completions, show the type of
  784.      each file with a trailing identifying mark.
  785. `LOCAL_OPTIONS'
  786.      If this option is set at the point of return from a shell
  787.      function, all the options (including this one) which were in force
  788.      upon entry to the function are restored.  Otherwise, only this
  789.      option and the `XTRACE' and `PRINT_EXIT_VALUE' options are
  790.      restored.  Hence if this is explicitly unset by a shell function
  791.      the other options in force at the point of return will remain so.
  792. `LOGIN (-l, ksh: -l)'
  793.      This is a login shell.
  794. `LONG_LIST_JOBS (-R)'
  795.      List jobs in the long format by default.
  796. `MAGIC_EQUAL_SUBST'
  797.      All unquoted arguments of the form `IDENTIFIER=EXPRESSION' have
  798.      file expansion performed on EXPRESSION as if it were a parameter
  799.      assignment, although the argument is not otherwise treated
  800.      specially.
  801. `MAIL_WARNING (-U)'
  802.      Print a warning message if a mail file has been accessed since the
  803.      shell last checked.
  804. `MARK_DIRS (-8, ksh: -X)'
  805.      Append a trailing `/' to all directory names resulting from
  806.      filename generation (globbing).
  807. `MENU_COMPLETE (-Y)'
  808.      On an ambiguous completion, instead of listing possibilities or
  809.      beeping, insert the first match immediately.  Then when completion
  810.      is requested again, remove the first match and insert the second
  811.      match, etc.  When there are no more matches, go back to the first
  812.      one again.  `reverse-menu-complete' may be used to loop through
  813.      the list in the other direction.  This option overrides
  814.      `AUTO_MENU'.
  815. `MONITOR (-m, ksh: -m)'
  816.      Allow job control.  Set by default in interactive shells.
  817. `NO_BAD_PATTERN (-2)'
  818.      If a pattern for filename generation is badly formed, leave it
  819.      unchanged in the argument list instead of printing an error.
  820. `NO_BANG_HIST (-K)'
  821.      Do not perform textual history substitution.  Do not treat the `!'
  822.      character specially.
  823. `NO_BEEP (-B)'
  824.      Do not beep.
  825. `NO_CLOBBER (-C, ksh: -C)'
  826.      Prevents `>' redirection from truncating existing files.  `>|' may
  827.      be used to truncate a file instead.  Also prevents `>>' from
  828.      creating files.  `>>|' may be used instead.
  829. `NO_EQUALS'
  830.      Don't perform `=' filename substitution.
  831. `NO_EXEC (-n, ksh: -n)'
  832.      Read commands and check them for syntax errors, but do not execute
  833.      them.
  834. `NO_FLOW_CONTROL'
  835.      Disable output flow control via start/stop characters (usually
  836.      assigned to `^S'/`^Q') in the shell's editor.
  837. `NO_GLOB (-F, ksh: -f)'
  838.      Disable filename generation.
  839. `NO_HIST_BEEP'
  840.      Don't beep when an attempt is made to access a history entry which
  841.      isn't there.
  842. `NO_HUP'
  843.      Don't send the `HUP' signal to running jobs when the shell exits.
  844. `NO_LIST_BEEP'
  845.      Don't beep on an ambiguous completion.
  846. `NO_MULTIOS'
  847.      Don't perform implicit `tee's or `cat's when multiple redirections
  848.      are attempted. *Note Redirection::.
  849. `NO_NOMATCH (-3)'
  850.      If a pattern for filename generation has no matches, leave it
  851.      unchanged in the argument list instead of printing an error.  This
  852.      also applies to file expansion of an initial `~' or `='.
  853. `NO_PROMPT_CR (-V)'
  854.      Don't print a carriage return just before printing a prompt in the
  855.      line editor.
  856. `NO_RCS (-f)'
  857.      Source only the `/etc/zshenv' file.  Do not source the `.zshenv',
  858.      `/etc/zprofile', `.zprofile', `/etc/zshrc', `.zshrc',
  859.      `/etc/zlogin', `.zlogin', or `.zlogout' files.
  860. `NO_SHORT_LOOPS'
  861.      Disallow the short forms of `for', `select', `if', and `function'
  862.      constructs.
  863. `NOTIFY (-5, ksh: -b)'
  864.      Report the status of background jobs immediately, rather than
  865.      waiting until just before printing a prompt.
  866. `NO_UNSET (-u, ksh: -u)'
  867.      Treat unset parameters as an error when substituting.
  868. `NULL_GLOB (-G)'
  869.      If a pattern for filename generation has no matches, delete the
  870.      pattern from the argument list instead of reporting an error.
  871.      Overrides `NO_NOMATCH'.
  872. `NUMERIC_GLOBSORT'
  873.      If numeric filenames are matched by a filename generation pattern,
  874.      sort the filenames numerically rather than lexicographically.
  875. `OVER_STRIKE'
  876.      Start up the line editor in overstrike mode.
  877. `PATH_DIRS (-Q)'
  878.      Perform a path search even on command names with slashes in them.
  879.      Thus if
  880.           `/usr/local/bin'
  881.      is in the user's path, and he types `X11/xinit', the command
  882.           `/usr/local/bin/X11/xinit'
  883.      will be executed (assuming it exists).  This applies to the `.'
  884.      builtin as well as to command execution.  Commands explicitly
  885.      beginning with `./' or `../' are not subject to path search.
  886. `PRINT_EXIT_VALUE (-1)'
  887.      Print the exit value of programs with non-zero exit status.
  888. `PRIVILEGED (-p, ksh: -p)'
  889.      Turn on privileged mode.  This is enabled automatically on startup
  890.      if the effective user (group) id is not equal to the real user
  891.      (group) id.  Turning this option off causes the effective user and
  892.      group ids to be set to the real user and group ids.  This option
  893.      disables sourcing user startup files.  If zsh is invoked as sh or
  894.      ksh with this option set, `/etc/suid_profile' is sourced (after
  895.      `/etc/profile' on interactive shells).  Sourcing `~/.profile' is
  896.      disabled and the contents of the `ENV' variable is ignored.  This
  897.      option cannot be changed using the `-m' option of `setopt' and
  898.      `unsetopt' and changing it inside a function always changes it
  899.      globally regardless of the `LOCAL_OPTIONS' option.
  900. `PROMPT_SUBST'
  901.      If set, "parameter expansion", "command substitution" and
  902.      "arithmetic expansion" is performed in prompts.
  903. `PUSHD_IGNORE_DUPS'
  904.      Don't push multiple copies of the same directory onto the directory
  905.      stack.
  906. `PUSHD_MINUS'
  907.      *Note Shell Builtin Commands::, for the `popd' command.
  908. `PUSHD_SILENT (-E)'
  909.      Do not print the directory stack after `pushd' or `popd'.
  910. `PUSHD_TO_HOME (-D)'
  911.      Have `pushd' with no arguments act like `pushd $HOME'.
  912. `RC_EXPAND_PARAM (-P)'
  913.      Array expansions of the form `foo${xx}bar', where the parameter
  914.      `xx' is set to `(a b c)', are substituted with `fooabar foobbar
  915.      foocbar' instead of the default `fooa b cbar'.
  916. `RC_QUOTES'
  917.      Allow the character sequence `''' to signify a single quote within
  918.      singly quoted strings.
  919. `REC_EXACT (-S)'
  920.      In completion, recognize exact matches even if they are ambiguous.
  921. `RM_STAR_SILENT (-H)'
  922.      Do not query the user before executing `rm *' or `rm path/*'.
  923. `SH_GLOB'
  924.      Disables the special meaning of `(', `|', `)' and `<' for globbing
  925.      the result of parameter and command substitutions, and in some
  926.      other places where the shell accepts patterns.  This option is set
  927.      if `zsh' is invoked as `sh' or `ksh'.
  928. `SHIN_STDIN (-s, ksh: -s)'
  929.      Commands are being read from the standard input.  Commands are
  930.      read from standard input if no command is specified with `-c' and
  931.      no file of commands is specified.  If `SHIN_STDIN' is set
  932.      explicitly on the command line, any argument that would otherwise
  933.      have been taken as a file to run will instead be treated as a
  934.      normal positional parameter.  Note that setting or un-setting this
  935.      option on the command line does not necessarily affect the state
  936.      the option will have while the shell is running; that is purely an
  937.      indicator of whether or not commands are actually being read from
  938.      standard input.  The value of this option cannot be changed
  939.      anywhere other than the command line.
  940. `SH_WORD_SPLIT (-y)'
  941.      *Note Parameter Expansion::.
  942. `SINGLE_COMMAND (-t)'
  943.      If the shell is reading from standard input, it exits after a
  944.      single command has been executed.  This also makes the shell
  945.      non-interactive, unless the `INTERACTIVE' option is explicitly set
  946.      on the command line.  The value of this option cannot be changed
  947.      anywhere other than the command line.
  948. `SINGLE_LINE_ZLE (-M)'
  949.      Use single-line command line editing instead of multi-line.
  950. `SUN_KEYBOARD_HACK (-L)'
  951.      If a line ends with a back-quote, and there are an odd number of
  952.      back-quotes on the line, ignore the trailing back-quote.  This is
  953.      useful on some keyboards where the return key is too small, and
  954.      the back-quote key lies annoyingly close to it.
  955. `VERBOSE (-v, ksh: -v)'
  956.      Print shell input lines as they are read.
  957. `XTRACE (-x, ksh: -x)'
  958.      Print commands and their arguments as they are executed.
  959. `ZLE (-Z)'
  960.      Use the zsh line editor.
  961.